package zhihuilan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import zhihuilan.entity.MyCircleDiscuss;
import zhihuilan.entity.MyCircleThumbup;

@Mapper
public interface MyCircleThumbupMapper extends BaseMapper<MyCircleThumbup> {
    @Select({" <script>  select count(b.id) as cnt " +
            "    from my_circle_thumbup a left JOIN my_circle b on a.pid = b.id left JOIN my_staff c on b.staff_id = c.id \n" +
            " where b.status = 1 and b.staff_id =#{staffId} \n" +
            " </script>"})
    Long selectCountToCircle(@Param("staffId") Integer staffId);
}
